package com.atguigu01._this.exer1;

/**
 * ClassName: BoyGirlTest
 * Package: com.atguigu01._this.exer1
 * Description:
 *
 * @Author 姜
 * @Create 2023/11/21 11:28
 * @Version 1.0
 */
public class BoyGirlTest {
    public static void main(String[] args) {
        Boy boy = new Boy("胡歌", 36);
        Girl girl = new Girl("迪丽热巴", 28);
        girl.marry(boy);

        boy.shout();

        Girl girl2 = new Girl("赵灵儿", 18);
        int compare = girl.compare(girl2);
        if (compare > 0) {
            System.out.println(girl.getName() + "大");
        } else if (compare < 0) {
            System.out.println(girl2.getName() + "大");
        } else {
            System.out.println("一样大");
        }
    }
}
